import request from '@/utils/request'

    /** 获取全部文件类型 */
    export function getFileType(params) {
      return request({
        url: '/assessDataMessage/dataManage/dataLoad/getFileType',
        method: 'get',
        params: params
      })
    }
    /** 点击文件名称 显示列表 */
    export function selectTableHead(params){
      return request({
        url: '/assessDataMessage/dataManage/dataLoad/selectTableHead',
        method: 'get',
        params: params
      })
    }
    /** 点击文件名称 显示列表 */
    export function getMaintenanceList(params){
      return request({
        url: '/assessDataMessage/dataManage/dataLoad/getMaintenanceList',
        method: 'get',
        params: params
      })
    }
    /** 列表-删除 */
    export function deleteMaintenanceRow(params){
      return request({
        url: '/assessDataMessage/dataManage/dataLoad/deleteMaintenanceRow',
        method: 'get',
        params: params
      })
    }
    /** 列表-保存 */
    export function saveRow(params){
      return request({
        url: '/assessDataMessage/dataManage/dataLoad/saveRow',
        method: 'post',
        data: params
      })
    }
    /**
     * 数据管理 数据维护 导出
     */
    export function downloadPhone(params) {
        // return request.get(getTempStr(`/assessDataMessage/dataManage/dataLoad/downloadPhone`,params), params)
        return toGetUrl(
            `/assessDataMessage/dataManage/dataLoad/downloadPhone`,
            params
        );
    }
function toGetUrl(url, params) {
    return (
        (process.env.VUE_APP_BASE_API.length>1?process.env.VUE_APP_BASE_API:"") +
      url +
      "?" +
      Object.keys(params)
        .flatMap((item) => (params[item] ? [`${item}=${params[item]}`] : []))
        .join("&")
    );
}



